package com.wxd.framework.service.impl;

import java.util.List;

import org.dom4j.Document;

import com.wxd.framework.common.FrameConstants;
import com.wxd.framework.common.utils.XMLUtils;

public class BaseServiceImpl {

	public <T> List<T> getListFromXml(String fileName, T t){
		return XMLUtils.readXml(fileName, FrameConstants.XML_PATH_DEFAULT, t);
	}
	
	public <T> void setXmlByList(String fileName, List<T> list, T t){
		XMLUtils.writeXml(t, list,FrameConstants.XML_ABSOULTE_PATH_TEMP, fileName);
	}
}
